import request from '@/utils/request'

// 查询动漫列表
export function listAnimation(query) {
  return request({
    url: '/type/animation/list',
    method: 'get',
    params: query
  })
}

// 查询动漫详细
export function getAnimation(id) {
  return request({
    url: '/type/animation/' + id,
    method: 'get'
  })
}

// 新增动漫
export function addAnimation(data) {
  return request({
    url: '/type/animation',
    method: 'post',
    data: data
  })
}

// 修改动漫
export function updateAnimation(data) {
  return request({
    url: '/type/animation',
    method: 'put',
    data: data
  })
}

// 删除动漫
export function delAnimation(id) {
  return request({
    url: '/type/animation/' + id,
    method: 'delete'
  })
}
